Skip to content

feat: Add Grafana integration#3040

Open
mfuzailzubari wants to merge 158 commits intosuperplanehq:mainfrom
mfuzailzubari:feat/grafana-integration
Open

feat: Add Grafana integration#3040
mfuzailzubari wants to merge 158 commits intosuperplanehq:mainfrom
mfuzailzubari:feat/grafana-integration

Conversation

@mfuzailzubari
Copy link

Implements #1945

This PR implements the Grafana integration with:

  • Query Data Source action (Grafana Query API via POST /api/ds/query)

Authorization:

  • Grafana API key/service account token for API calls
  • Optional Shared Secret for the alert webhook via Authorization: Bearer

Implementation notes:

  • Query Data Source now sends datasource as { uid: "" } to match Grafana’s Query API.
  • Grafana alert trigger now creates a unique webhook per trigger node (not a shared integration webhook).
  • Added unit tests for Query Data Source and On Alert Firing auth handling.

Demo video: https://drive.google.com/file/d/117GAjLWyp2pic79nzOqDvvDm64-qA094/view?usp=sharing

@AleksandarCole AleksandarCole added pr:stage-1/3 Needs to pass basic review. wfh labels Feb 11, 2026
@AleksandarCole AleksandarCole added pr:stage-2/3 Needs to pass functional review and removed pr:stage-1/3 Needs to pass basic review. labels Feb 12, 2026
@AleksandarCole
Copy link
Collaborator

@mfuzailzubari thank you for submitting this one!
Can you please resolve the branch conflicts. I will move on to the functional testing in the meantime, one thing I can see from the video is that integration and components do not use Grafana icon, please address that one when you get the chance and I will share more details after functional review.

@mfuzailzubari
Copy link
Author

@mfuzailzubari thank you for submitting this one! Can you please resolve the branch conflicts. I will move on to the functional testing in the meantime, one thing I can see from the video is that integration and components do not use Grafana icon, please address that one when you get the chance and I will share more details after functional review.

Conflits are resolved, moving on to other findings.

@mfuzailzubari
Copy link
Author

Fixed all the issues raised in the thread.

@AleksandarCole
Copy link
Collaborator

@mfuzailzubari I have not managed to set this up fully - I tested the query component and it worked, but the trigger one is not good. We need to avoid user having to configure these webhooks manually if there are API endpoints through which we can do this.

@mfuzailzubari
Copy link
Author

@mfuzailzubari I have not managed to set this up fully - I tested the query component and it worked, but the trigger one is not good. We need to avoid user having to configure these webhooks manually if there are API endpoints through which we can do this.

fixed it. please check.

@AleksandarCole AleksandarCole added pr:stage-3/3 Ready for full, in-depth, review and removed pr:stage-2/3 Needs to pass functional review labels Feb 17, 2026
@AleksandarCole
Copy link
Collaborator

@mfuzailzubari managed to get it to work.
Before I request any UI, assigning to engineering to evaluate the approach and do a code review.
@forestileao can you take this one?

@forestileao
Copy link
Collaborator

Also, the CI tests should pass

mfuzailzubari and others added 28 commits February 19, 2026 16:22
Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
…ent docs (superplanehq#1945)

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
… UI-editable (superplanehq#1945)

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
…uperplanehq#1945)

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
… datasource listing (superplanehq#1945)

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
…egacy API key fallback) (superplanehq#1945)

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
… copy button (superplanehq#1945)

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
…te firing trigger on top-level status (superplanehq#1945)

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
…onAlertFiring setup

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
…lanehq#1945)

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
…lanehq#1945)

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
This PR bootstraps AWS SNS integration support.

Implemented SNS components:
- `aws.sns.onTopicMessage`
- `aws.sns.getTopic`
- `aws.sns.getSubscription`
- `aws.sns.createTopic`
- `aws.sns.deleteTopic`
- `aws.sns.publishMessage`

---------

Signed-off-by: Fadhili Juma <ffumwa@gmail.com>
Signed-off-by: Lucas Pinheiro <lucas@superplane.com>
Co-authored-by: Lucas Pinheiro <lucas@superplane.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
Three new GitLab components:
- `gitlab.getPipeline` - fetch information about a pipeline
- `gitlab.getLatestPipeline` - fetch the latest pipeline on a ref
- `gitlab.getTestReportSummary` - fetch the test report summary for a
pipeline

---------

Signed-off-by: Lucas Pinheiro <lucas@superplane.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
New components for GItLab:
- New gitlab.onPipeline trigger to listen to GitLab pipeline events
- New gitlab.runPipeline trigger to run GitLab pipelines

---------

Signed-off-by: Lucas Pinheiro <lucas@superplane.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
…anehq#3116)

Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
This PR overhauls the SuperPlane CLI command structure to make resource
discovery and canvas workflows easier, while also making command
implementation more maintainable.

Before:

```
superplane <action> <resource>
```

Now

```
superplane <resource> <action>
```

The new structure makes it easier to discover things, build an internal
structure to extend the commands and sub-commands going forward, and is
also a pattern used in other CLIs - [see
gh](https://github.com/cli/cli).

### CLI internals

- Refactored CLI internals into a reusable command framework:
  - Added `pkg/cli/core` with shared command binding/context logic.
- Added centralized output rendering with support for `text`, `json`,
and `yaml`.
- Reorganized CLI commands into resource-focused groups under
`pkg/cli/commands/*`

### New discovery-focused commands:

- `superplane integrations list --connected`
- `superplane integrations list-resources --id <integration-id> --type
<resource-type> [--parameters key=value,...]`
- `superplane components list --from <integration>`
- `superplane triggers list --from <integration>`

### Global output flag

You can control the output of the commands now with `--output` flag.
Available options are: json / yaml / text.

---------

Signed-off-by: Lucas Pinheiro <lucas@superplane.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
Signed-off-by: Igor Šarčević <igor@operately.com>
Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
…rplanehq#3131)

Right now, we have this:

```
superplane integrations list                   -> list available integrations
superplane integrations list --connected       -> list connected integrations
superplane integrations get <integration-name> -> get details about an available integration
```

The issue here is that we also need commands for managing connected
integrations, and having them and the discovery-related commands under
the same root is a bit confusing.

So, I'm moving all the discovery-related commands to a new index
command:

```
superplane index integrations
superplane index integrations --name <integration-name>
superplane index triggers
superplane index triggers --from <integration-name>
superplane index triggers --name <trigger-name>
superplane index components
superplane index components --from <integration-name>
superplane index components --name <trigger-name>
```

With that, everything under the index command is about discovery, and
finding available integrations, triggers, and components you can use,
and `superplane integrations` becomes about managing connected
integrations.

---------

Signed-off-by: Lucas Pinheiro <lucas@superplane.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
…ls consistency (superplanehq#1945)

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
…shared secret input (superplanehq#1945)

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
… UI-editable (superplanehq#1945)

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
…uperplanehq#1945)

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
…egacy API key fallback) (superplanehq#1945)

Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
Signed-off-by: Muhammad Fuzail Zubari <mfuzail.zubari@gmail.com>
@mfuzailzubari mfuzailzubari force-pushed the feat/grafana-integration branch from db83eab to f7a4c8c Compare February 19, 2026 11:24
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@@ -0,0 +1,2 @@
ALTER TABLE app_installations
ALTER COLUMN state_description TYPE character varying(1024);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New migrations missing down migration files

Medium Severity

Both new migration files are added without corresponding .down.sql counterparts. Every one of the 50+ existing migrations in the codebase has a paired .down.sql file. Without down migrations, schema changes from these two migrations cannot be rolled back, and any tooling or CI checks that enforce migration symmetry will fail.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:stage-3/3 Ready for full, in-depth, review wfh

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Comments